package a.b.c.sample.autoConfig;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("v2")
public class Web2 {

    @Resource
    private MyBatisProperties properties;

//    private String flag;

    @Resource
    private Appv appv;

//    public Web2(String flag){
//        this.flag = flag;
//    }

//    @RequestMapping("flag")
//    public String req1(){
//        return flag;
//    }

    @RequestMapping("env")
    public Object req2(){
        return System.getenv();
    }

    @RequestMapping("prop")
    public Object prop(){
        return System.getProperties();
    }

    @RequestMapping("prop2")
    public Object prop2(){
        return properties;
    }

    @RequestMapping("app")
    public Appv app(){
        return appv;
    }

    public MyBatisProperties getProperties() {
        return properties;
    }

    public void setProperties(MyBatisProperties properties) {
        this.properties = properties;
    }

//    public String getFlag() {
//        return flag;
//    }

//    public void setFlag(String flag) {
//        this.flag = flag;
//    }

    public Appv getApp() {
        return appv;
    }

    public void setApp(Appv appv) {
        this.appv = appv;
    }
}
